@@ -1,6 +1,5 @@ |
||
| 1 | 1 |
class @AgentShowPage |
| 2 | 2 |
constructor: -> |
| 3 |
- |
|
| 4 | 3 |
$(".agent-show #show-tabs a[href='#logs'], #logs .refresh").on "click", @fetchLogs
|
| 5 | 4 |
$(".agent-show #logs .clear").on "click", @clearLogs
|
| 6 | 5 |
$(".agent-show #memory .clear").on "click", @clearMemory
|
@@ -43,14 +42,12 @@ class @AgentShowPage |
||
| 43 | 42 |
$("#logs .refresh, #logs .clear").show()
|
| 44 | 43 |
|
| 45 | 44 |
toggleMemory: -> |
| 46 |
- |
|
| 47 | 45 |
if $('#memorypanel').hasClass('hidden')
|
| 48 | 46 |
$('#memorypanel').removeClass 'hidden'
|
| 49 | 47 |
else |
| 50 | 48 |
$('#memorypanel').addClass 'hidden'
|
| 51 | 49 |
|
| 52 | 50 |
clearMemory: (e) -> |
| 53 |
- |
|
| 54 | 51 |
if confirm("Are you sure you want to clear memory of this Agent?")
|
| 55 | 52 |
agentId = $(e.target).closest("[data-agent-id]").data("agent-id")
|
| 56 | 53 |
e.preventDefault() |
@@ -63,7 +60,6 @@ class @AgentShowPage |
||
| 63 | 60 |
.fail -> |
| 64 | 61 |
$("#memory .spinner").fadeOut ->
|
| 65 | 62 |
$("#memory .clear").css(display: 'inline-block')
|
| 66 |
- |
|
| 67 |
- |
|
| 63 |
+ |
|
| 68 | 64 |
$ -> |
| 69 | 65 |
Utils.registerPage(AgentShowPage, forPathsMatching: /^agents\/\d+/) |